/**
 * Created by Administrator on 2017/8/18.
 */
function mySubString(search,s){
    var pos = s.lastIndexOf('#');
    if (pos!=-1){
        s = s.slice(0,pos);
    }

    return s;
}
//    console.log(mySubString("#",s));

function mySubStringAfter(search,s){
    var pos = s.lastIndexOf(search);
    if (pos!=-1){
        s = s.slice(pos+1);
    } else {
        s = 0;
    }

    return s;
}
function getParam(search,s){
    s = mySubStringAfter('?',s);
    if (s.indexOf("=")){
        var arr = s.split("=")
        s = arr[1]

    }else {
        s = ''
    }
    return s;
}